package com.bizframework.security.domain.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.bizframework.core.domain.BaseEntity;

public class Group extends BaseEntity<String> {

	private Group parentGroup;

	private List<Group> childGroups;

	private List<User> users;
	/**
	 * 
	 */
	private List<Permission> permissions;
	/**
	 * 组名
	 */
	private String name;
	/**
	 * 组类型
	 */
	private String groupType;
	/**
	 * 备注
	 */
	private String note;
	/**
	 * 创建时间
	 */
	private Date createDate;

	public List<User> getUsers() {
		if (users == null) {
			users = new ArrayList<User>();
		}
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGroupType() {
		return groupType;
	}

	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public List<Permission> getPermissions() {
		if (permissions == null) {
			permissions = new ArrayList<Permission>();
		}
		return permissions;
	}

	public void setPermissions(List<Permission> permissions) {
		this.permissions = permissions;
	}

	public List<Group> getChildGroups() {
		if (childGroups == null) {
			childGroups = new ArrayList<Group>();
		}
		return childGroups;
	}

	public void setChildGroups(List<Group> childGroups) {
		this.childGroups = childGroups;
	}

	public Group getParentGroup() {
		return parentGroup;
	}

	public void setParentGroup(Group parentGroup) {
		this.parentGroup = parentGroup;
	}
}